<form method="get" class="form-horizontal">
    <div class="form-group">
        <label class="col-sm-3 col-sm-offset-1 control-label">视图名称：</label>
        <div class="col-sm-7">
            <p class="form-control-static">通讯录加人</p>
        </div>
    </div>
     <div class="hr-line-dashed"></div>
        <div class="form-group">
            <label class="col-sm-3 col-sm-offset-1 control-label">话术：</label>
            <div class="col-sm-7">
                <textarea id="view_hs" class="form-control textarea-control" rows="3" placeholder="请输入话术" data-emojiable="true" data-emoji-input="unicode"></textarea>
            </div>
        </div>
    <div class="hr-line-dashed"></div>
        <div class="form-group">
            <label class="col-sm-3 col-sm-offset-1 control-label">输入标签：</label>
                <div class="col-sm-5">
                 <input id="view_tag" type="text" class="form-control"/>
            </div>
        </div>
    <div class="hr-line-dashed"></div>
        <div class="form-group">
            <label class="col-sm-3 col-sm-offset-1 control-label">添加上限：</label>
                <div class="col-sm-2">
                <input id="view_limit" type="text" class="form-control"/>
            </div>
        </div>
</form>

<!-- #################################通讯录加人################################## -->
<!--emoji-->
<link href="v3/face/css/emoji.css" rel="stylesheet"/>
<!-- Begin emoji-picker JavaScript -->
<script src="v3/face/js/config.js"></script>
<script src="v3/face/js/util.js"></script>
<script src="v3/face/js/jquery.emojiarea.js"></script>
<script src="v3/face/js/emoji-picker.js"></script>
<!-- End emoji-picker JavaScript -->
<script>
    $(function() {
        window.emojiPicker = new EmojiPicker({
            emojiable_selector: '[data-emojiable=true]',
            assetsPath: 'v3/face/img/',
            popupButtonClasses: 'fa fa-smile-o'
        });
        window.emojiPicker.discover();
    });
</script>
<script>
    function btn_select_manage(){
        var view_hs = $("#view_hs").val();
        var view_tag = $("#view_tag").val();
        var view_limit = $("#view_limit").val();
        if ( view_hs == "") {
              toastr.warning("请输入话术")
        }else if ( view_tag == "" ){
            toastr.warning("请输入标签")
        }else if ( view_limit == "" ){
            toastr.warning("请输入添加上限")
        }else if( !validate( view_limit ) ){
            toastr.warning("请输入正确添加上限")
        }else{
            var json = { "view_tag" : [view_tag], "view_limit" : view_limit, "view_hs" : view_hs }
            issuedData.setView(JSON.stringify(json)) ;
            $("#select_manage").modal("hide");
            $("#btn_manage").text( view_tag );
            $("#btn_manage").show();
            $("#btn_manage").prev().show();
            $("#btn_manage").prev().prev().hide();
            Color.success("state_manage");
        }
    }
</script>